docs(example): byo-backend-console README teaches ObjectView from plugin-view, not the phantom ObjectRenderer - #7942
Merged
Conversation
…ectRenderer `examples/byo-backend-console/README.md` taught `ObjectRenderer` from `@object-ui/app-shell` in three snippets (six sites). No export of any package in this repository bears that name, so the import does not resolve — and it is the copy-paste starting point for the bring-your-own-backend path. A bare rename to `@object-ui/app-shell`'s `ObjectView` was measured and rejected: that component reads `objectName` from the router via `useParams`, needs an `objects` metadata array, and types its whole props surface as `any`, so a wrong prop raises nothing at build time. Measured here: the bare-rename form type-checks clean (tsc exit 0, zero diagnostics) while staying broken at runtime. The spelling that works is `ObjectView` from `@object-ui/plugin-view`, in the shape this example's own `src/App.tsx` already runs: a `schema` of `type: 'object-view'` carrying `objectName`, plus the `dataSource` prop its type requires. The snippets now show where that data source comes from — directly in the App.tsx mirror, and via `useDataSource()` from `@object-ui/providers` inside `DataSourceProvider` for the generic ones. Verified by transcribing all three snippets into a scratch .tsx inside the example (not committed) and running the example's own `tsc --noEmit` against the built `dist/index.d.ts` of each package: green, with the scratch file and those dist types proven present in the 3002-file program via `--listFiles`. Three planted errors each turned it red and were restored by hash. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013uAaxiwgYDybsTNV9xwa1M
baozhoutao
marked this pull request as ready for review
September 6, 2026 03:55
baozhoutao
deleted the
claude/issue-7095-byo-backend-readme-objectview
branch
September 6, 2026 04:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7095
What was wrong
examples/byo-backend-console/README.mdtaughtObjectRendererfrom@object-ui/app-shellin three snippets — six sites, at lines 63, 72, 88, 89, 107, 110. No export of any package in this repository bears that name, so the import does not resolve. This README is the copy-paste starting point for the bring-your-own-backend path, whose readers have no way to tell a phantom name from a real one.Why not a bare rename
The card proposed renaming to
@object-ui/app-shell'sObjectView. That was measured on this branch and rejected.packages/app-shell/src/views/ObjectView.tsx:865isexport function ObjectView({ dataSource, objects, onEdit, externalRefreshKey }: any)— it readsobjectNamefrom the router (useParams, line 866), needs anobjectsmetadata array (line 876), and types its whole props surface asany.Measured leg, run in this worktree: the bare-rename form —
import { ObjectView } from '@object-ui/app-shell'with anobjectNameprop — type-checks clean,tscexit 0, zero diagnostics, while staying broken at runtime. That is the failure mode the neighbouring measurement named, now confirmed on this card's own file.The spelling that works is
ObjectViewfrom@object-ui/plugin-view, the oneexamples/byo-backend-console/src/App.tsxalready runs and the one PR objectui#7836 used for the root README.What the snippets say now
All three carry a
schemaoftype: 'object-view'withobjectName, plus thedataSourceprop the type requires (packages/plugin-view/dist/ObjectView.d.ts:43—dataSource: DataSource, no question mark).src/App.tsx: a route renders a smallObjectPageof your own that pullsobjectNamefromuseParamsand passesmockDataSource.useDataSource()from@object-ui/providersto show where the data source comes from insideDataSourceProvider— the same composition PR objectui#7836 introduced.src/App.tsxis untouched: it is the reference this README must agree with. No export or type was minted anywhere, and no CHANGELOG was edited (the two historicalObjectRenderermentions stay).Compile check, by hand
This file is outside the doc gate's scan surface, so the compile check is not automatic. Measured with the gate's own
listDocuments()rather than read off its header: 227 documents in the surface, 0 underexamples/, this file absent; controls positive — rootREADME.mdpresent, 39 package READMEs present.check-readme-exportsreports the same boundary in its census: "43 tracked README(s) under packages/ (0 outside any package)".So all three snippets were transcribed into a scratch
.tsxinside the example (never committed; removed before the commit) and judged by the example's owntsc --noEmitwith its own tsconfig, against the builtdist/index.d.tsof each package.Not a hoped-for green —
--listFilesproves what was in the program: the scratch file present, andpackages/plugin-view/dist/ObjectView.d.ts,packages/providers/dist/DataSourceProvider.d.ts,packages/app-shell/dist/...among 3002 files.Three planted errors, each proven on disk before the run and restored by sha256 afterwards:
Restored tree back to exit 0. Name-count leg on the file itself:
ObjectRendererin the README 6 to 0, withpackages/app-shell/CHANGELOG.mdas the control, still 1.Gates
Run at
f2c189cc6, verdict lines as each gate printed them:check:readme-exportsfirst reported exit 1 naming 61 unjudgeable self-imports, every one of them "type entry not on disk — runpnpm buildfirst". That is an unmet prerequisite, not a red gate: after a fullturbo run buildit prints0 unbuiltand passes. Recorded rather than dropped.Files changed: 1. No changeset owed — an example README publishes nothing.
Related: objectui#7094 (the sweep that filed it), objectui#7838 (same phantom in
docs/ARCHITECTURE.md, a separate card).Draft, no auto-merge, per dispatch.
Generated by Claude Code